package com.mouchel.gwt.xpath.client.impl;

import java.util.List;

import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.xml.client.Element;

public class XPathImplIE extends XPathImpl
{

	@Override
	protected native void evaluateImpl(Element element, String xpath, List<JavaScriptObject> results) /*-{
		var jso = @com.google.gwt.xml.client.impl.XPathUtil::getJsObject(Lcom/google/gwt/xml/client/Node;)(element);
		var nodes = jso.ownerDocument.selectNodes(xpath);
		for (var n = 0; n < nodes.length; n++)
		{
			results.@java.util.List::add(Ljava/lang/Object;)(nodes[n]);
		}	
	}-*/;

}
